<template>
  <div class="me-page">
    <headBar  isBack="show">
      <div slot="xm-header-center">
        <div class="xm-header-title" >我的采购审批</div>
      </div>
      <div slot="xm-header-right"></div>
    </headBar>
    <div class="examine-group">
      <div class="item flex flex-pack-justify flex-align-center border-bottom" v-for="item in exaList" @click="toCheck(item.addressId, item.userIdSub)">
        <div class="item-left">
          <h3>{{item.nameSub}}</h3>
          <p>采购申请时间： {{item.time}}</p>
        </div>
        <i class="icon icon-arrowright"></i></div>
    </div>
    <!--数据为空-->
    <div class="empty marginTop20" v-show="exaList.length==0">
      <i class="icon icon-wujieguoyangshi"></i>
      <p class="marginTop20">没有数据</p>
    </div>
  </div>
</template>
<script>
  export default {
    props: {},
    data() {
      return {
        exaList: []
      };
    },
    methods: {
        //获取采购申请列表
        purchaseList(){
          myPruchaseExa().then(data=>{
              if(data.returnCode == '000000'){
                  this.exaList = data.result.exaList;
              }
          })
        },
      /**
       * 跳转到采购审核页面
       * @param <string> 子订单号
       * */
        toCheck(addressId, userIdSub){
          this.$router.push({name: 'purchaseCheck', params: {addressId: addressId || 0,userIdSub: userIdSub}});
        }
    },
    filters: {},
    created() {
      this.purchaseList();
    },
    mounted(){

    },
    components: {
    }
  };
</script>
<style lang="less">
  @import "./me.less";
</style>
